angular.module('app')
.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider){
//	$urlRouterProvider.otherwise("");
	$urlRouterProvider.otherwise("/stocklist/selfSelects");
	$stateProvider
		// home page 
		.state('home', {
			url: "/home",
			views: {
				"content": { 
					templateUrl: "resources/pages/home/content_home.html"
				}
			}
		})
	
		// stockmgr page
		.state('stocklist', {
			url: "/stocklist",
			views: {
				"content": { 
					templateUrl: "resources/pages/maintenance/stockmgr/stocklist.html" 
				}
			}
		})
		.state('stocklist.stocks', {
			url: "/stocks",
			templateUrl: 'resources/pages/maintenance/stockmgr/stocklist_stocks.html'
		})
		.state('stocklist.indexes', {
			url: "/indexes",
            templateUrl: 'resources/pages/maintenance/stockmgr/stocklist_indexes.html'
        })
        .state('stocklist.selfSelects', {
			url: "/selfSelects",
            templateUrl: 'resources/pages/maintenance/stockmgr/stocklist_selfselect.html'
        })
		
		// categorymgr page
		.state('categorylist', {
			url: "/categorylist",
			views: {
				"jumbotron": { 
					template: ""
				},
				"content": { 
					templateUrl: "resources/pages/maintenance/categorymgr/categorylist.html" 
				}
			}
		})
		.state('categorylist.categories', {
			url: "/categories",
			templateUrl: 'resources/pages/maintenance/categorymgr/catlist_categories.html'
		})
		
		// taskmgr page
		.state('tasklist', {
			url: "/tasklist",
			views: {
				"jumbotron": { 
					template: ""
				},
				"content": { 
					templateUrl: 'resources/pages/maintenance/taskmgr/tasklist.html'
				}
			}
		})
		.state('tasklist.tasks', {
			url: "/tasks",
			templateUrl: 'resources/pages/maintenance/taskmgr/tasklist_tasks.html'
		})
		
		.state('gtja_recommends', {
			url: "/gtja_recommends",
			views: {
				"jumbotron": { 
					template: ""
				},
				"content": { 
					templateUrl: 'resources/pages/maintenance/gtja/gtja_recommends.html'
				}
			}
		})
		
		// dashboard page 
		.state('dashboard', {
			url: "/dashboard",
			views: {
				"content": { 
					templateUrl: "resources/pages/dashboard/dash.html" 
				}
			}
		})

}]);